package com.mzj.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;

public class PropertiesUtils {

    public static Map<String,String> getParamMap() {  
        InputStream in = PropertiesUtils.class  
                .getResourceAsStream("/prop.properties");  
        Properties p = new Properties();
        Map<String,String> map = new HashMap<String,String>();
        try {  
            p.load(in);  
            for(Entry<Object, Object> entry : p.entrySet()) {
            	String k = (String)entry.getKey();
            	String v = (String)entry.getValue();
            	map.put(k, v);
            }
            return map;
        } catch (IOException e) {  
            e.printStackTrace();  
        }  
        return map;  
    }  
    
}
